<%@ page language="java" pageEncoding="UTF-8"%>

<%@ taglib uri="http://struts.apache.org/tags-bean" prefix="bean"%>
<%@ taglib uri="http://struts.apache.org/tags-html" prefix="html"%>
<%@ taglib uri="http://struts.apache.org/tags-logic" prefix="logic"%>
<%@ taglib uri="http://struts.apache.org/tags-tiles" prefix="tiles"%>

<script language="JavaScript">
<!--
function confirmDelete(){
    return confirm('确定删除该用户?');
  }
-->
</script>

<logic:notPresent name="userName" scope="session">
	<logic:redirect forward="login"></logic:redirect>
</logic:notPresent>

<logic:notEqual name="userName" scope="session" value="admin">
	<logic:redirect forward="login"></logic:redirect>
</logic:notEqual>

<logic:present name="info" scope="request">
	<font color="red"><bean:write name="info" scope="request" /> </font>
</logic:present>
<table border="1" bordercolor="#AAAAFF" cellspacing="0" cellpadding="0">
	<tr>
		<td align="center">
			<b>登录名</b>
		</td>
		<td align="center">
			<b>姓名</b>
		</td>
		<td align="center">
			<b>性别</b>
		</td>
		<td align="center">
			<b>年龄</b>
		</td>
		<td align="center">
			<b>工作年限</b>
		</td>
		<td align="center">
			<b>联系地址</b>
		</td>
		<td align="center">
			<b>积分</b>
		</td>
		<td align="center">
			<b>特长</b>
		</td>
		<td align="center">
			<b>用户等级</b>
		</td>
		<td align="center">
			<b>推荐人</b>
		</td>
		<td align="center" colspan="2">
			<b>管理</b>
		</td>
	</tr>
	<tr>
		<logic:iterate name="userlist" id="row" indexId="rowNum"
			type="com.yhtl.struts.bean.UserBean" scope="request">
			<tr>
				<td align="center">
					<!--  bean:write name="rowNum" scope="page" /-->
					<bean:write name="row" property="tblUserinfoLoginname" />
				</td>
				<td align="center">
					<bean:write name="row" property="tblUserinfoName" />
				</td>
				<td align="center">
					<logic:equal name="row" property="tblUserinfoSex" value="0">男</logic:equal>
					<logic:equal name="row" property="tblUserinfoSex" value="1">女</logic:equal>
				</td>
				<td align="center">
					<bean:write name="row" property="tblUserinfoAge" />
				</td>
				<td align="center">
					<bean:write name="row" property="tblUserinfoWorkyear" />
				</td>
				<td align="center">
					<bean:write name="row" property="tblUserinfoContact" />
				</td>
				<td align="center">
					<bean:write name="row" property="tblUserinfoPoint" />
				</td>
				<td align="center">
					<bean:write name="row" property="tblUserinfoCapability" />
				</td>
				<td align="center">
					<bean:write name="row" property="tblUserinfoLevel" />
				</td>
				<td align="center">
					<bean:write name="row" property="tblUserinfoRecommandname" />
				</td>
				<td align="center">
					<html:link href="editUser.do" paramId="uid" paramName="row"
						paramProperty="tblUserinfoLoginid">修改</html:link>
				</td>
				<td>
					<html:link href="delUser.do" paramId="uid" paramName="row"
						paramProperty="tblUserinfoLoginid"
						onclick="return confirmDelete();">删除</html:link>
				</td>
			</tr>
		</logic:iterate>
	</tr>
</table>
第
<bean:write name="page" property="currentPage" />
页 共
<bean:write name="page" property="totalPages" />
页
<html:link action="/viewUser.do?pageMethod=first" paramName="page"
	paramProperty="currentPage" paramId="currentPage">首页</html:link>
<html:link action="/viewUser.do?pageMethod=previous" paramName="page"
	paramProperty="currentPage" paramId="currentPage">上一页</html:link>
<html:link action="/viewUser.do?pageMethod=next" paramName="page"
	paramProperty="currentPage" paramId="currentPage">下一页</html:link>

<html:link action="/viewUser.do?pageMethod=last" paramName="page"
	paramProperty="currentPage" paramId="currentPage">尾页</html:link>
